# Tomcat7

FROM            10.0.16.125:5080/general/centos:7
MAINTAINER      Lijc lijc@siccs.cn
# import java
ADD             jre.tbz /opt/
RUN             ln -s /opt/jre* /opt/jre
# import tomcat
ADD             tomcat.tbz /opt/
RUN             ln -s /opt/apache-tomcat* /opt/tomcat
# import config file
RUN             cd /opt/tomcat && rm -f conf/server.xml bin/setenv.sh
ADD             server.xml /opt/tomcat/conf/
ADD             setenv.sh /opt/tomcat/bin/
# create persistent volume directory
RUN             mkdir /opt/pv
RUN             mv /opt/tomcat/logs /opt/pv/tomcat_log
RUN             ln -s /opt/pv/tomcat_log /opt/tomcat/logs
RUN             mv /opt/tomcat/webapps /opt/pv/tomcat_app
RUN             ln -s /opt/pv/tomcat_app /opt/tomcat/webapps
# import docker entry script
ADD             docker-entrypoint /opt/
RUN             chmod 0755 /opt/docker-entrypoint
EXPOSE          8080
CMD             /opt/docker-entrypoint

